package com.wit.witmg.api;


import com.wit.witmg.service.ITFileLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * @author bob
 * @since 2025-05-06
 */
@RestController
@RequestMapping("fileLog")
@Api(tags = "文件日志API")
public class FileLogController {
     @Resource
     private ITFileLogService service;

    @ApiOperation("添加")
    @PostMapping("add")
    public Object add(HttpServletRequest request,
                      @RequestParam("code") String code,
                      @RequestParam("str") String str) {
        return service.add(request,code,str);
    }

    @ApiOperation("获取")
    @PostMapping("get")
    public Object get(HttpServletRequest request,
                      @RequestParam(value = "code",required = false) String code) {
        return service.get(request,code);
    }
}
